<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
</head>
<body>
<form action="/project/studentlogin" method="GET">
    用户名：<input type="text" name="userName"> <br>
    密码：<input type="password" name="password"> <br>

    验证码：<input type="number" name="vcode">
    <img src="/project/vcode" alt="图片走丢了~" onclick="refreshVCode(this)"> <br>
    <input type="submit" value="登录">
    <a href="/project/html/regist.html">去注册</a>
</form>


<script>
    function refreshVCode(data) {
        //new Date().getTime():在这里就是为了加一个参数，为了让请求触发
        data.src = "/project/vcode?" + new Date().getTime();
    }
</script>
</body>
</html>